using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{

    class Program
    {
        static void Main(string[] args)
        {
            //宠物店
            PetShop per = new PetShop();
            Tiger tiger = new Tiger();
            per.Petshop(tiger);

            Console.WriteLine("----------------------");

            Cat cat = new Cat();
            per.Petshop(cat);

            Console.WriteLine("----------------------");

            Eagle eagle = new Eagle();
            per.Petshop(eagle);

            Console.WriteLine("----------------------");

            Swallow swallow = new Swallow();
            per.Petshop(swallow);

            Console.ReadLine();
        }
    }

    class PetShop
    {
        public void Petshop(Animal a)
        {
            a.Cry();
            a.Eat();
            a.Sleep();
            a.Walk();
        }
    }

    class Animal
    {
        public void Walk()
        {
            Console.WriteLine("我会走路！");
        }
        public void Eat()
        {
            Console.WriteLine("我会吃！");
        }
        public void Sleep()
        {
            Console.WriteLine("我会睡觉！");
        }
        public virtual void Cry()
        {
            Console.WriteLine("我要叫了哦");
        }
    }

 
    class Birds : Animal
    {
        public void Fly()
        {
            Console.WriteLine("我可以飞！");
        }
    }

    class Cat : Felidae
    {
        public void Grab()
        {
            Console.WriteLine("我会抓老鼠");
        }
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("喵喵喵");
        }
    }


    class Eagle : Birds
    {
        public void Fash()
        {
            Console.WriteLine("我会抓鱼");
        }
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("呀");
        }
    }

    class Felidae : Animal
    {
        public void See()
        {
            Console.WriteLine("我有夜视能力！");
        }
    }    

   class Swallow : Birds
    {
        public void Cross()
        {
            Console.WriteLine("我会穿花衣");
        }
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("叽叽叽叽");
        }
    }

 
    class Tiger : Felidae
    {
        public void Sing()
        {
            Console.WriteLine("我会唱两只老虎");
        }
        public override void Cry()
        {
            base.Cry();
            Console.WriteLine("嚯嚯嚯");
        }
    }
}
